import { TYPE } from "./index";
import Base from "./Base";

export default class Fade extends Base {
    constructor(el: HTMLElement) {
        super(el, TYPE.FADE);
        this.getMethods(this.setPage);
    }

    private setPage(pageItems: HTMLCollection, curIdx: number) {
        [...pageItems].map((item: HTMLElement) => {
            item.className = 'page-item';
        });
        pageItems[curIdx].className += ' active';
    }
}